﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace Sale_Common
{
    /// <summary>
    /// Session封装类
    /// </summary>
    public class HttpSession
    {
        public void Add(string name, object value)
        {
            System.Web.HttpContext.Current.Session.Add(name, value);

        }
        public object this[int index]
        {
            get
            {
                return System.Web.HttpContext.Current.Session[index];
            }
            set
            {
                System.Web.HttpContext.Current.Session[index] = value;
            }
        }

        public object this[string name]
        {
            get
            {
                return System.Web.HttpContext.Current.Session[name];
            }
            set 
            { 
                System.Web.HttpContext.Current.Session[name] = value;            
            }
        }



    }
}
